//
//  ZSHomeBannerViewController.m
//  ZhuShou
//
//  Created by Dejun Liu on 15/11/2.
//  Copyright © 2015年 jw. All rights reserved.
//

#import "ZSHomeBannerViewController.h"


@interface ZSHomeBannerViewController ()

@property (strong, nonatomic) IBOutlet UIView *banner1;
@property (strong, nonatomic) IBOutlet UIView *banner2;
@property (strong, nonatomic) IBOutlet UIView *banner3;

@property (nonatomic,strong) UIScrollView *scrollView;


@end

@implementation ZSHomeBannerViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (void)initViews
{
    [super initViews];
    self.scrollView = [[UIScrollView alloc] initWithFrame:self.view.bounds];
    [self.view addSubview:self.scrollView];
    
    self.scrollView.pagingEnabled = YES;
    self.scrollView.contentSize = CGSizeMake(self.view.width*3, self.view.height);
    
    self.banner1.width = self.view.width;
    self.banner1.height = self.view.height;
    self.banner1.top = 0;
    self.banner1.left = 0;
    [self.scrollView addSubview:self.banner1];
    
    self.banner2.width = self.view.width;
    self.banner2.height = self.view.height;
    self.banner2.top = 0;
    self.banner2.left = self.view.width;
    [self.scrollView addSubview:self.banner2];
    
    self.banner3.width = self.view.width;
    self.banner3.height = self.view.height;
    self.banner3.top = 0;
    self.banner3.left = self.view.width*2;
    [self.scrollView addSubview:self.banner3];
}

@end
